package com.atguigu.rabbit.consumer.listener.simple;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class Consumer01Listener {

    @RabbitListener(queues = "simple_queue")
    public void simpleQueen(Message message) {
        byte[] body = message.getBody();
        String msg = new String(body);
        System.out.println("msg ----> " + msg);
    }

}